package day15;

import java.util.Scanner;

/**
 * @author tongchen
 * @create 2023-03-21 23:16
 */
public class Main {
    public static void main(String[] args) {
        Scanner scan=new Scanner(System.in);
        int num=scan.nextInt();
        int count=0;
        while(num!=0){
            if((num&1)!=0){
                count++;
            }
            num=num>>>1;
        }
        System.out.println(count);
    }
}
